import axios from '../request';

interface Notice {
  isUnread: boolean;
  value: string;
  pageNo: number;
  pageSize: number;
}
// 列表数据
export const noticeList = (params: Notice) => {
  return axios.get<any>(`api/notice/list`, params);
};
//删除通知
export const delnoticeList = (params: any) => {
  return axios.delete<any>(`api/notice/list`, params);
};
//删除已读
export const delRead = () => {
  return axios.delete<any>(`api/notice/read`, {});
};
//标记已读
export const readList = (params: any) => {
  return axios.put<any>(`api/notice/read`, params);
};
//标记已读所有
export const readListAll = () => {
  return axios.put<any>(`api/notice/readAll`);
};
//获取通知详情
export const noticeInfo = (id: any) => {
  return axios.get<any>(`api/notice/${id}`, {});
};
//获取未读数量

export const noticeTotal = () => {
  return axios.get<any>(`api/notice/total`, {});
};
